const panelAction = [
  {
    id: 'fullScreen',
    name: '全屏显示', //全屏显示 需要用户行为激活,如按钮，快捷键。语音指令无法使用！
    type: 'system',
    exec: (app) => {
      app.fullScreen()
    }
  },
  {
    id: 'exitScreen',
    name: '退出全屏',
    type: 'system',
    exec: (app) => {
      app.exitScreen()
    }
  },
  {
    id: 'toggleFullScreen',
    name: '切换全屏',
    type: 'system',
    exec: (app) => {
      app.toggleFullScreen()
    }
  },
  {
    id: 'panelServer.close',
    name: '关闭控制面板',
    type: 'system',
    exec: (app) => {
      app.panelServer.close()
    }
  },
  {
    id: 'panelServer.open',
    name: '打开控制面板',
    type: 'system',
    exec: (app) => {
      app.panelServer.open()
    }
  },
  {
    id: 'panelServer.toggle',
    name: '切换控制面板',
    type: 'system',
    exec: (app) => {
      app.panelServer.toggle()
    }
  },
  {
    id: 'panelServer.reset',
    name: '重置设置',
    type: 'system',
    exec: (app) => {
      app.panelServer.reset()
    }
  },
  {
    id: 'panelServer.closeConsole',
    name: '关闭控制台',
    type: 'system',
    exec: (app, params) => {
      app.panelServer.closeConsole()
    }
  },
  {
    id: 'panelServer.openConsole',
    name: '打开控制台',
    type: 'system',
    exec: (app, params) => {
      app.panelServer.openConsole()
    }
  },
  {
    id: 'panelServer.toggleConsole',
    name: '切换控制台',
    type: 'system',
    exec: (app, params) => {
      app.panelServer.toggleConsole()
    }
  },
  {
    id: 'panelServer.activeTab',
    name: '切换Tab',
    type: 'system',
    exec: (app, params) => {
      if (params.key) {
        let key = params.key
        app.panelServer.activeTab(key.slice(-1))
        return
      }
      const result = params[0]
      switch (result) {
        case '系统设置':
          app.panelServer.activeTab('1')
          break
        case '项目设置':
          app.panelServer.activeTab('2')
          break
        case '开发者':
          app.panelServer.activeTab('3')
      }
    }
  },
  {
    id: 'panelServer.nextTab',
    name: '切换到下一个Tab',
    type: 'system',
    exec: (app, params) => {
      app.panelServer.nextTab()
    }
  },
  {
    id: 'panelServer.prevTab',
    name: '切换到上一个Tab',
    type: 'system',
    exec: (app, params) => {
      app.panelServer.prevTab()
    }
  },
  // {
  //   id: 'panelServer.toggleBlock',
  //   name: '模块控制',
  //   type: 'system',
  //   exec: (app, params) => {
  //     let key = params.key
  //     app.panelServer.toggleBlock(key.slice(-1))
  //   }
  // },
  {
    id: 'panelServer.prevBlock',
    name: '展开上一个模块',
    type: 'system',
    exec: (app, params) => {
      app.panelServer.prevBlock()
    }
  },
  {
    id: 'panelServer.nextBlock',
    name: '展开下一个模块',
    type: 'system',
    exec: (app, params) => {
      app.panelServer.nextBlock()
    }
  },
  {
    id: 'panelServer.toggleFooterNav',
    name: '切换底部',
    type: 'system',
    exec: (app, params) => {
      app.panelServer.toggleFooterNav()
    }
  }
]
export default panelAction
